package com.zhaochao.dao;
import java.sql.Connection;
import java.sql.DriverManager;

public class MySQLConn implements iConn {
	private static final String DBDRIVER = "org.gjt.mm.mysql.Driver" ;
	private static final String DBURL = "jdbc:mysql://localhost:3306/test" ;
	private static final String DBUSER = "root" ;
	private static final String DBPASS = "wh5268925";
	
    //public static final String  DBDRIVER     = "oracle.jdbc.driver.OracleDriver";
    //public static final String  DBURL        = "jdbc:oracle:thin:@192.168.120.41:1521:newzjol";
    //public static final String  DBUSER       = "ali";
    //public static final String  DBPASS   = "zjAli8531";
	
	private Connection conn=null;
	public Connection getConn() throws Exception {
		try {
			Class.forName(DBDRIVER);
			this.conn=DriverManager.getConnection(DBURL, DBUSER, DBPASS);
		} catch (Exception e) {
			throw e;
		}
		return this.conn;
	}

}
